//
// Created by Huafv on 2024/10/16.
//

#ifndef BT_HCI_H
#define BT_HCI_H

#include "bt_common.h"

#define HCI_EVT_HDR_LEN 2
#define HCI_ACL_HDR_LEN 4
#define HCI_SCO_HDR_LEN 3
#define HCI_CMD_HDR_LEN 3

#pragma pack (1)

typedef struct
{
    uint16_t opcode;
    uint8_t len;
}hci_cmd_hdr_t;

typedef struct
{
    uint8_t code; /* Event code */
    uint8_t len;  /* Parameter total length */
}hci_evt_hdr_t;

typedef struct
{
    uint16_t conhdl_pb_bc; /* Connection handle, packet boundary and broadcast flag flag */
    uint16_t len; /* length of data */
} hci_acl_hdr_t;

#pragma pack ()

#endif //BT_HCI_H
